%%%%%
%%
%% This file creates the Item, ItemPacket, ItemFold, ItemEnvelope, and
%% ItemLabel datatypes, and creates macros for each.  These are for
%% various types of in-game items.
%%
%%%%%


%%%%%
%% Item macros are for normal item cards.
\DECLARESUBTYPE{Item}{TransElement}
\PRESETS{Item}{
  \FD\MYtext	{} %% longer text of item
  \FD\MYmark	{} %% possible contents of shaded ``mark'' on card
  \FD\MYbulky	{0} %% potential bulkiness
  \FD\MYcapacity{N/A} %% potential capacity
  \sd\MYlistmap	{\item\MYname\ifx\MYnumber\empty\else\ (\MYnumber)\fi}
  }


%%%%%
%% \prop
%% \unstash
%% \bulky{<number>}
%% \contain{<number>}
%%
%% \prop inside an Item macro labels the card as a prop.  \unstash
%% labels the card as unstashable.  \bulky{n} labels the card as
%% n-hands bulky.  \contain{n} labels the card with n-hands capacity.
\def\prop{%
  \append\MYmark{ ~PROP~ }}
\def\unstash{%
  \append\MYmark{ ~UNSTASHABLE~ }}
\def\bulky#1{%
  \s\MYbulky{#1}%
  \append\MYmark{\mbox{ ~\MYbulky-Hand~Bulky~ }}}
\def\contain#1{%
  \s\MYcapacity{#1}%
  \append\MYmark{\mbox{ ~\MYcapacity-Hand~Capacity~ }}}


%%%%%
%% ItemPacket macros are for item cards with an attached packet.
%% They are a subtype of Item.
\DECLARESUBTYPE{ItemPacket}{Item}
\PRESETS{ItemPacket}{
  \F\MYcontents
  }


%%%%%
%% ItemFold macros are for items represented by just a folded packet.
%% They are a subtype of ItemPacket, with the longer text and ``mark''
%% left blank, since they have no actual item card.
\DECLARESUBTYPE{ItemFold}{ItemPacket}
\PRESETS{ItemFold}{
  \s\MYmark{}
  }


%%%%%
%% ItemEnvelope macros are for items represented by just an envelope.
%% They are a subtype of ItemPacket, with the longer text and ``mark''
%% left blank, since they have no actual item card.
\DECLARESUBTYPE{ItemEnvelope}{ItemPacket}
\PRESETS{ItemEnvelope}{
  \s\MYmark{}
  }


%%%%%
%% ItemLabel macros are for small labels that would get used on
%% physreps, e.g. gun labels.  The ``mark'' is left blank, since
%% it isn't used for these.
\DECLARESUBTYPE{ItemLabel}{Item}
\PRESETS{ItemLabel}{
  \s\MYmark{}
  }


%%%%%
%% \icard[<extras>]{<name>}{<number>}{<text>}
%% \specialicard[<extras>]{<name>}{<number>}{<text>}{<mark>}
%% \itempacket[<extras>]{<name>}{<number>}{<text>}{<mark>}{<contents>}
%% \itemfold{<name>}{<number>}{<text>}{<contents>}
%% \itemenvelope{<name>}{<number>}{<text>}{<contents>}
%% \itemlabel{<name>}{<number>}{<text>}
%%
%% These are wrappers around \INSTANCE, useful for 1-shots.
%%
%% For \icard, \specialicard, and \itempacket, the optional <extras>
%% (in []'s) is for things like \unstash and \bulky{3}.  For example,
%% \icard[\prop\contain{2}]{..}{..}{..}{..} gives an item that has a
%% prop and 3-hands capacity.
%%
%% The last arg (#5) to \specialicard is for anything extra you may
%% want in the ``mark''
\newinstance{Item}{\icard[4][]}{
  \s\MYname{#2}\s\MYnumber{#3}\s\MYtext{#4}#1}
\newinstance{Item}{\specialicard[5][]}{
  \s\MYname{#2}\s\MYnumber{#3}\s\MYtext{#4}\s\MYmark{#5}#1}
\newinstance{ItemPacket}{\itempacket[6][]}{
  \s\MYname{#2}\s\MYnumber{#3}\s\MYtext{#4}\s\MYmark{#5}\s\MYcontents{#6}#1}
\newinstance{ItemFold}{\itemfold[4]}{
  \s\MYname{#1}\s\MYnumber{#2}\s\MYtext{#3}\s\MYcontents{#4}}
\newinstance{ItemEnvelope}{\itemenvelope[4]}{
  \s\MYname{#1}\s\MYnumber{#2}\s\MYtext{#3}\s\MYcontents{#4}}
\newinstance{ItemLabel}{\itemlabel[3]}{
  \s\MYname{#1}\s\MYnumber{#2}\s\MYtext{#3}}


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%

\NEW{Item}{\iTest}{
  \s\MYname	{Test Item}
  \s\MYnumber	{0000}
  \s\MYtext	{A Test Item Card}
  }

\NEW{ItemPacket}{\iTestPacket}{
  \s\MYname	{Test Item}
  \s\MYnumber	{0000}
  \s\MYtext	{A Test Item with a big red button.  Open packet if
		you press the big red button.}
  \s\MYcontents	{The item beeps at you.}
  }

\NEW{ItemFold}{\iTestFold}{
  \s\MYname	{Test Food}
  \s\MYnumber	{0000}
  \s\MYtext	{open if you eat}
  \s\MYcontents	{It tastes yummy.}
  }

\NEW{Item}{\iQuill}{
  \s\MYname	{The Quill of Dark Desire}
  \s\MYnumber	{365	}
  \s\MYtext	{A Quill that emanate  magical energy}
  }

\NEW{ItemFold}{\iTestEnvelope}{
  \s\MYname	{Test Food}
  \s\MYnumber	{0000}
  \s\MYtext	{open if you eat}
  \s\MYcontents	{It tastes yummy.}
  }

\NEW{ItemLabel}{\iTestLabel}{
  \s\MYname	{Test Gun Label}
  \s\MYnumber	{0000}
  \s\MYtext	{Disc gun, loadable to 20 shots.}
  }

\NEW{Item}{\iWhatzit}{
  \s\MYname	{Whatzit}
  \s\MYnumber	{12345}
  \s\MYtext	{If you press it, open packet a.  If you twirl it, open
		packet b.  If you pull it, open packet c.}
  \bulky	{1}
  \s\MYsigns	{\signstrip{a}{it goes ``beep.''}
		\signstrip{b}{it goes ``whoop.''}
		\signstrip{c}{it goes ``bang.''}
		}
  \s\MYabils	{\ability{Stop Crying}{By futzing with the Whatzit, you
		can make babies stop crying.}{I make the baby stop
		crying.}
		}
  }


%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\NEW{Item}{\iDaywalkerFruit}{
  \s\MYname	{Sunberries}
  \s\MYnumber	{162}
  \s\MYtext	{These grow on sunny hillsides and are harvested at Midsummer.}
  } %exists

\NEW{Item}{\iEyebright}{
  \s\MYname	{Eyebright}
  \s\MYnumber	{982}
  \s\MYtext	{A small, many-petaled white flower with a bright yellow center.}
  } %exists

 \NEW{Item}{\iPhylacterydust}{
  \s\MYname	{Phylactery Dust}
  \s\MYnumber	{375}
  \s\MYtext	{A fine glowing powder}
  } %exists
 
\NEW{Item}{\iDreamcatcher}{
  \s\MYname	{Dreamcatcher}
  \s\MYnumber	{822}
  \s\MYtext	{An intricate jade talisman engraved with a starry landscape.}
  } %exists, put with baby fae

	%\NEW{Item}{\iQuill}{
  %\s\MYname	{The Quill of Dark Desire}
  %\s\MYnumber	{0000}
  %\s\MYtext	{A Quill that emanate  magical energy}
  %}
\NEW{Item}{\iGingko}{
  \s\MYname	{Gingko Leaves}
  \s\MYnumber	{234}
  \s\MYtext	{Green and yellow fan-shaped leaves.}
  } %exists
\NEW{Item}{\iBaster}{
	\s\MYname {Turkey Baster}
	\s\MYnumber {264}
	\s\MYtext {It bastes turkeys.}
	} %exists
	
\NEW{Item}{\iBilberries}{
  \s\MYname	{Bilberries}
  \s\MYnumber	{847}
  \s\MYtext	{Small, dark blue berries that resemble blueberries.}
  }%exists
  
\NEW{Item}{\iBlueprint}{
  \s\MYname	{Magical Gun Blueprints}
  \s\MYnumber	{434}
  \s\MYtext	{Meticulously-drafted blueprints of how to augment a human gun with magically-enhanced propulsion.}
  } %exists, put with wizard
  
  \NEW{Item}{\iForsythia}{
  \s\MYname	{Forsythia}
  \s\MYnumber	{347}
  \s\MYtext	{A cluster of bright yellow flowers.}
  } %exists
  	
\NEW{Item}{\iSwordofIce}{
  \s\MYname	{The Legendary Sword of Ice}
  \s\MYnumber	{249}
  \s\MYtext	{You feel a surge of power while holding this sword. +5 CR while weilding this item.}
  \s\MYbulky	{2}
  } %exists
	
\NEW{Item}{\iVorpalSwordofWonder}{
  \s\MYname	{Sword fragment}
  \s\MYnumber	{123}
  \s\MYtext	{You feel a tingling sensation as you touch this fragment.}
  \s\MYbulky	{1}
  } %exists
\NEW{Item}{\iRVorpal}{
	\s\MYname {Vorpal Sword of Wonder}
	\s\MYnumber {321}
	\s\MYtext {The reforged Vorpal Sword of Wonder! It glows brightly, with a razor sharp blade. It gives +5CR}
	}
\NEW{Item}{\iOrbofPower}{
  \s\MYname	{The Legendary Orb of Power}
  \s\MYnumber	{281}
  \s\MYtext	{This orb radiates with heat and magic. You may treat your cr as 15  long as you possess the orb.}
  \s\MYbulky	{1}
  } %exists
	
	\NEW{ItemFold}{\iTearofMagic}{
  \s\MYname	{Tear of Magic}
  \s\MYnumber	{303}
  \s\MYtext	{open if you drink}
  \s\MYcontents	{Go see a GM}
  } %does not exists yet. Will put with both Fae
	
\NEW{Item}{\iSeedoftheWorldTree}{
  \s\MYname	{Seed of the World Tree}
  \s\MYnumber	{605}
  \s\MYtext	{A glowing seed of the World Tree}
  } %exists
\NEW{Item}{\iPhylactery}{
  \s\MYname	{Phylactery}
  \s\MYnumber	{403}
  \s\MYtext	{A glowing jewelstone. You make destroy this item by making a combined CR 20 attack against it. If you do so, bring this item to a GM and tell them. %goes in the krogoth's room
	} %exists
  }
  
\NEW{Item}{\iLovePotion}{
  \s\MYname	{The Love Potion}
  \s\MYnumber	{203}
  \s\MYtext	{A pink potion that smells nice %goes in the river
	}
  } %exists
  
\NEW{Item}{\iHolyBook}{
	\s\MYname {Holy Book of Groznak}
	\s\MYnumber {111}
	\s\MYtext {A book sacred to the followers of Groznak}
	} %exists
	
\NEW{Item}{\iRitualWand}{
	\s\MYname {The Ritual Wand}
	\s\MYnumber {222}
	\s\MYtext {A wand that glows}
	\s\MYbulky	{1}
	} %exists
	
\NEW{Item}{\iReaperIdol}{
	\s\MYname {Idol of the Reaper}
	\s\MYnumber {666}
	\s\MYtext {A statue of the grim reaper. The holder and any group they're in my pass through the warded door in the dungeon.}
	\s\MYbulky	{1}
	} %exists
	
\NEW{Item}{\iDominationIdol}{
	\s\MYname {Idol of Domination}
	\s\MYnumber {777}
	\s\MYtext {A statue of a pile of chains. The holder and any group they're in my pass through the warded door in the dungeon.}
	\s\MYbulky	{1}
	} %exists
	
\NEW{Item}{\iNatureIdol}{
	\s\MYname {Idol of Nature}
	\s\MYnumber {811}
	\s\MYtext {A statue of a tree. The holder and any group they're in my pass through the warded door in the dungeon.}
	\s\MYbulky	{1}
	} %exists
	
\NEW{Item}{\iDagger}{
	\s\MYname {Sacrificial Dagger}
		\s\MYnumber {148}
	\s\MYtext {A dagger used for ritual sacrifices.}
	} %exists
	
\NEW{Item}{\iWardBook}{
	\s\MYname {Ward and Rune Repair Manual}
	\s\MYnumber {694}
	\s\MYtext {A book containing instructions on repairing wards and runes}
	} %exsists
	
\NEW{Item}{\iRope}{
	\s\MYname {Rope}
	\s\MYnumber {250}
	\s\MYtext {A coil of rope}
	} %exists
	
\NEW{Item}{\iTorch}{
	\s\MYname {Torch}
	\s\MYnumber {352}
	\s\MYtext {A burning torch. It is a good light source.}
	} %exists
\NEW{Item}{\iSmokeBomb}{
	\s\MYname {Smoke Bomb}
	\s\MYnumber {215}
	\s\MYtext {A small glass orb filled with a dark liquid. Consume upon use requires ablity}
	} %exists
		
\NEW{Item}{\iNightshade}{
	\s\MYname {Nightshade}
	\s\MYnumber {658}
	\s\MYtext {A curious looking white and purple flower}
	} %exists
	
\NEW{Item}{\iBHeart}{
	\s\MYname {Bleeding Heart}
	\s\MYnumber {199}
	\s\MYtext {A curious looking red and pink flower}
	} %exists
	
\NEW{Item}{\iCandle}{
	\s\MYname {Candle}
	\s\MYnumber {098}
	\s\MYtext {A plain, wax candle. It is a good light source.}
	}
\NEW{Item}{\iBCandle}{
	\s\MYname {Black Candle}
	\s\MYnumber {097}
	\s\MYtext {A candle made from pitch black wax, as far as you can tell. When lit, it seems to suck in light instead of providing it.}
	} %exists

	\NEW{Item}{\iStorch}{
		\s\MYname {Sacred Torch}
		\s\MYnumber {373}
		\s\MYtext {A torch that burns with a magical flame. Not only does it provide light, but attacks made with it count as fire damage. It also counts as three torches.}
		} %exists
	
\NEW{Item}{\iCFungus}{
	\s\MYname {Cave Fungus}
	\s\MYnumber {512}
	\s\MYtext {A clump of mushrooms taken from a cave.}
	}%exists

\NEW{Item}{\iCFirearm}{
	\s\MYname {Stealthy Firearm}
	\s\MYnumber {556}
	\s\MYtext {A gun which gives you +5 CR when used. You must you the incant bang when using the Stealthy Firearm}
	}%exists
	
\NEW{Item}{\iKeyT}{
	\s\MYname {Key to Treasure Room}
	\s\MYnumber {558}
	\s\MYtext {This is a big, golden key that unlocks Onyx's treasure room.}
	}%exists
	
\NEW{Item}{\iGolemNotesA}{
	\s\MYname {Zumwalt's Golem Construction Manual, Part 1}
	\s\MYnumber {991}
	\s\MYtext {This is a torn set of pages that describe how to build a golem, and appears to be a part of a larger work. The writing style is very unusual: it does not appear to be hand-written.}
	} %exists

\NEW{Item}{\iGolemNotesB}{
	\s\MYname {Zumwalt's Golem Construction Manual, Part 2}
	\s\MYnumber {992}
	\s\MYtext {This is a torn set of pages that describe how to build a golem, and appears to be a part of a larger work. The writing style is very unusual: it does not appear to be hand-written.}
	} %cannot find
	
\NEW{Item}{\iGolemNotesC}{
	\s\MYname {Zumwalt's Golem Construction Manual, Part 3}
	\s\MYnumber {993}
	\s\MYtext {This is a torn set of pages that describe how to build a golem, and appears to be a part of a larger work. The writing style is very unusual: it does not appear to be hand-written.}
	} %exitst

\NEW{Item}{\iGolemNotesD}{
	\s\MYname {Zumwalt's Golem Construction Manual, Part 4}
	\s\MYnumber {994}
	\s\MYtext {This is a torn set of pages that describe how to build a golem, and appears to be a part of a larger work. The writing style is very unusual: it does not appear to be hand-written.}
	} %cannot find
	
\NEW{Item}{\iGolemNotesE}{
	\s\MYname {Zumwalt's Golem Construction Manual, Part 5}
	\s\MYnumber {995}
	\s\MYtext {This is a torn set of pages that describe how to build a golem, and appears to be a part of a larger work. The writing style is very unusual: it does not appear to be hand-written.} %exists
	}
	
\NEW{Item}{\iGolemControlRod}{
	\s\MYname {An Ornate Rod}
	\s\MYnumber {490}
	\s\MYtext {This steel rod is engraved with complicated, glowing runes. The word \textbf{Zumwalt} is engraved on the handle.}
	} %exists
	
	\NEW{Item}{\iDemonomicron}{
  \s\MYname	{Demonomicron}
  \s\MYnumber	{667}
  \s\MYtext	{An old book bound in leather. Inside lies the history Demonkind written in a magical language.}
  }
	
\NEW{Item}{\iSphinxBook}{
  \s\MYname	{Common Children's Tales}
  \s\MYnumber	{4}
  \s\MYtext	{A weathered book with human cautionary tales.}
	}
	
  \NEW{Item}{\iLichBook}{
	\s\MYname {Physiology and Evolution of the Magical Beast}
	\s\MYnumber {4321}
	\s\MYtext {This is a book. It is filled with a magical symbolic language that you cannot read. }
	} %exists
	
\NEW{Item}{\iMissive}{
	\s\MYname {Missive to dispatch an army}
	\s\MYnumber {100}
	\s\MYtext {
	
  I, \underline{\hspace*{3cm}}, the leader if the \underline{\hspace*{3cm}} army, order my forces:
  
	
	\emph{(Choose one)}
	
	\begin{itemize}
	\item To join with the monster horde and oppose the humans!
	\item To leave the other monsters to their fate and seek asylum with the humans!
	\end{itemize} %exists
	}
	}
	
	\NEW{Item}{\iFlask}{
  \s\MYname	{Flask of Spiritual Resurrection}
  \s\MYnumber	{706}
  \s\MYtext	{A foul-smelling flask containing a brew that combines a powerful set of reagents.}
  }
	
	\NEW{Item}{\iQuintu}{
  \s\MYname	{A Quintu Seed}
  \s\MYnumber	{952}
  \s\MYtext	{One of the most powerful fruits from the heart of the fae realms.}
  }
	\NEW{Item}{\iPaper}{
	\s\MYname {Paper}
	\s\MYnumber {265}
	\s\MYtext {A plain sheet of paper}
	}
	\NEW{Item}{\iNormalQuill}{
	\s\MYname {Quill}
	\s\MYnumber {724}
	\s\MYtext {A regular quill used for writing}
	}
	